<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use \think\Route;
// Route::domain("adminapi.pyg.com",function(){
    Route::get("/","adminapi/index/index");
    # 验证码接口
    Route::get("verify","adminapi/login/verify");
    # 验证码图片访问权限
    \think\Route::get('captcha/[:id]', "\\think\\captcha\\CaptchaController@index");
    # 登录接口
    Route::post("login","adminapi/login/login");
    # 退出登录
    Route::get("logout","adminapi/login/logout");
    # 单图片上传
    Route::post("logo","adminapi/upload/logo");
    # 多图片上传
    Route::post("images","adminapi/upload/images");
    # 商品分类
    Route::resource("category","adminapi/category",[],["id"=> "\d+"]);
    # 商品品牌
    Route::resource("brand","adminapi/brand",[],["id"=> "\d+"]);
    # 商品模型
    Route::resource("types","adminapi/type",[],["id" => "\d+"]);
    # 商品接口
    Route::delete("delpic/:id","adminapi/goods/delpic",[],["id" => "\d+"]);
    # 商品接口
    Route::resource("goods","adminapi/goods");
    # 权限接口
    Route::resource("auths","adminapi/auth",[],["id" => "\d+"]);
    # 返回菜单权限
    Route::get("nav","adminapi/auth/nav");
    # 角色接口
    Route::resource("roles","adminapi/role",[],["id" => "\d+"]);
    # 管理员接口
    Route::resource("admins","adminapi/admin",[],["id" => "\d+"]);
// });
